The in-and-out control of a disc tray in a conventional CD/DVD player or CD/DVD ROM is based on the position detection of the disc tray by means of a mechanical switch. In practice, a position of the disc tray is defined to contact with and push a mechanical switch to an “ON” state when the tray is dragged out of a CD player, or, to an “OFF” state on the contrary. By this way, the program is provided to monitor the ON/OFF change of the mechanical switch to perform in-and-out movements of the disc tray.
Unfortunately, the mechanical switch has a limited lifetime as a detection measure for in-and-out control of the disc tray in a conventional CD/DVD player or CD/DVD ROM, which is scrapped as long as the switch is damaged. To remedy this defect, it would require a high-quality mechanical switch at a high cost.